//
//  HealthyFilesCell.m
//  掌上宏力
//
//  Created by admin on 2017/4/27.
//  Copyright © 2017年 admin. All rights reserved.
//

#import "HealthyFilesCell.h"
@interface HealthyFilesCell()

@property (nonatomic,strong) UILabel *healthyIdL;
@property (nonatomic,strong) UILabel *numberL;
@property (nonatomic,strong) UILabel *dateL;
@property (nonatomic,strong) UILabel *resultDateL;
@property (nonatomic,strong) UILabel *operatorL;

@end
@implementation HealthyFilesCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(void)setHealthyInfoWithModel:(HealthyInfoModel *)model{
    /*
     {
     \"PE_ID\": \"53289\",
     \"PE_VISIT_ID\": 3,
     \"PE_PRE_DATE\": \"2016/9/515: 49: 00\",
     \"LAST_AUDIT_DATE\": \"2016/9/510: 28: 29\",
     \"PE_PRE_OPERATOR\": \"李晗\",
     \"ADDRESS\": \"\"
     },
     */
    
    UIView *headView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenW-25, 40)];
//    headView.backgroundColor = [UIColor grayColor];
    [self addSubview:headView];
    
    //
    CGFloat width = (kScreenW-155-6-6)*0.5;
    CGFloat height = 39;
    _healthyIdL = [self createlabelWithFrame:CGRectMake(1, 0, 65, height) text:model.healthyId];

    _dateL = [self createlabelWithFrame:CGRectMake(_healthyIdL.right+1, 0, width, height) text:model.date];
    _resultDateL = [self createlabelWithFrame:CGRectMake(_dateL.right+1, 0, width, height) text:model.resultDate];
    _operatorL = [self createlabelWithFrame:CGRectMake(_resultDateL.right+1, 0, 65, height) text:model.healthyOperator];
    
    [headView addSubview:_healthyIdL];

    [headView addSubview:_dateL];
    [headView addSubview:_resultDateL];
    [headView addSubview:_operatorL];

}
-(UILabel *)createlabelWithFrame:(CGRect)frame text:(NSString *)text{
    UILabel *lab = [Factory createLabelWithTitle:text frame:frame fontSize:15];
    lab.textAlignment = NSTextAlignmentCenter;
    lab.backgroundColor = [UIColor whiteColor];
    return lab;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
